package org.shiwen.week6;

public class StudentV1 {
    //属性
    String name;
    int age;
    String gender;
    String ID;

    //构造方法
    public StudentV1(String xingming, int nianling, String xingbie, String xuehao) {
        name = xingming;
        age = nianling;
        gender = xingbie;
        ID = xuehao;
    }

    public StudentV1() {
    }

    //方法
    public void showInfo() {
        System.out.println("姓名：" + name + "，年龄：" + age + "，性别：" + gender + "，学号：" + ID);
    }

    public void study(int minutes) {
        System.out.println(name + "正在学习" + minutes + "分钟");
    }

    public void eat(String food) {
        System.out.println(name + "正在吃" + food);
    }
}
